Simplified switching for state of charge balancing of battery strings and modules

ABSTRACT

A battery system includes: at least two battery modules, where each of the at least two battery modules includes three strings of battery cells; and a switch control module configured to: determine state of charges (SOCs) of the strings of battery cells, respectively; determine, using model predictive control based on the SOCs, periods of phases, respectively; determine, using model predictive control based on the SOCs, periods for the strings, respectively, to be connected to a second positive terminal and a negative terminal during the phases, the determination of the periods for the strings including: setting the period for one of the strings of one of the battery modules to end before the end of a phase; and setting the periods for the other two strings of the one of the battery modules to end at the end of the phase.

INTRODUCTION

The information provided in this section is for the purpose of generallypresenting the context of the disclosure. Work of the presently namedinventors, to the extent it is described in this section, as well asaspects of the description that may not otherwise qualify as prior artat the time of filing, are neither expressly nor impliedly admitted asprior art against the present disclosure.

The present disclosure relates to vehicles and more particularly tobattery systems of vehicles.

Some types of vehicles include only an internal combustion engine thatgenerates propulsion torque. Hybrid vehicles include both an internalcombustion engine and one or more electric motors. Some types of hybridvehicles utilize the electric motor and the internal combustion enginein an effort to achieve greater fuel efficiency than if only theinternal combustion engine was used. Some types of hybrid vehiclesutilize the electric motor and the internal combustion engine to achievegreater torque output than the internal combustion could achieve byitself.

Some example types of hybrid vehicles include parallel hybrid vehicles,series hybrid vehicles, and other types of hybrid vehicles. In aparallel hybrid vehicle, the electric motor works in parallel with theengine to combine power and range advantages of the engine withefficiency and regenerative braking advantages of electric motors. In aseries hybrid vehicle, the engine drives a generator to produceelectricity for the electric motor, and the electric motor drives atransmission. This allows the electric motor to assume some of the powerresponsibilities of the engine, which may permit the use of a smallerand possibly more efficient engine. The present application isapplicable to electric vehicles, hybrid vehicles, and other types ofvehicles.

SUMMARY

In a feature, a battery system includes: a first positive terminal, asecond positive terminal, and a negative terminal; switches; at leasttwo battery modules, where each of the at least two battery modulesincludes three strings of battery cells that are configured to, atdifferent times be: connected in series and to the first positiveterminal via first ones of the switches; connected in parallel and tothe second positive terminal via second ones of the switches; anddisconnected from both of the first and second positive terminals; and aswitch control module configured to: determine state of charges (SOCs)of the strings of battery cells, respectively; determine, using modelpredictive control based on the SOCs, periods of phases, respectively;determine, using model predictive control based on the SOCs, periods forthe strings, respectively, to be connected to the second positiveterminal and the negative terminal during the phases, the determinationof the periods for the strings including: setting the period for one ofthe strings of one of the battery modules to end before the end of aphase; and setting the periods for the other two strings of the one ofthe battery modules to end at the end of the phase; and selectivelyactuate the switches based on the periods of the phases and the periodsfor the strings of battery cells.

In further features, the switch control module is configured to, usingmodel predictive control, set a first period of a first one of thephases to one of (a) greater than and (b) less than a second period of asecond one of the phases.

In further features, the switch control module is configured to, usingmodel predictive control, set a third period of a third one of thephases to: one of (a) greater than and (b) less than the second periodof the second one of the phases; and one of (a) greater than and (b)less than the first period of the first one of the phases.

In further features, the switch control module is configured to, usingmodel predictive control, set first, second, and third periods of first,second, and third ones of the phases to values that are different fromeach other.

In further features, the switch control module is further configured to:set the period for a second one of the strings of a second one of thebattery modules to end before the end of a second phase; and setting theperiods for the other two strings of the second one of the batterymodules to end at the end of the second phase.

In further features, the switch control module is configured to actuatethe switches and: disconnect one of the strings of one of the batterymodules before the end of a phase during charging of the one of thebattery modules based on the SOC of the one of the strings being greaterthan the SOCs of the other strings of the one of the battery modules ata beginning of the phase; and disconnect the other strings of the one ofthe battery modules at the end of the phase.

In further features, the switch control module is configured to actuatethe switches and: disconnect one of the strings of one of the batterymodules before the end of a phase during discharging of the one of thebattery modules based on the SOC of the one of the strings being lessthan the SOCs of the other strings of the one of the battery modules ata beginning of the phase; and disconnect the other strings of the one ofthe battery modules at the end of the phase.

In further features, the switch control module is configured to, basedon minimizing an error between the SOCs of the strings of battery cells,determine the periods of the phases and the periods for the strings.

In further features, the error is a squared error between the SOCs ofthe strings of battery cells.

In further features, each of the strings of battery cells includesmultiple battery cells connected in series.

In further features, the multiple battery cells include four three voltbattery cells.

In further features, the switch control module is configured to controlthe switches such that one of the strings of battery cells is not at thesame time connected to both the first positive terminal and the secondpositive terminal.

In further features: the first positive terminal is configured to outputa first reference potential; the second positive terminal is configuredto output a second reference potential; and the first referencepotential is greater than the second reference potential.

In a feature, a method for a battery includes: determining state ofcharges (SOCs) of strings of battery cells, respectively, of at leasttwo battery modules, wherein each of the at least two battery modulesincludes three strings of battery cells that are configured to, atdifferent times be: connected in series and to a first positive terminalvia first ones of switches; connected in parallel and to a secondpositive terminal via second ones of the switches; and disconnected fromboth of the first and second positive terminals; and determining, usingmodel predictive control based on the SOCs, periods of phases,respectively; determining, using model predictive control based on theSOCs, periods for the strings, respectively, to be connected to thesecond positive terminal and a negative terminal during the phases, thedetermination of the periods for the strings including: setting theperiod for one of the strings of one of the battery modules to endbefore the end of a phase; and setting the periods for the other twostrings of the one of the battery modules to end at the end of thephase; and selectively actuating the switches based on the periods ofthe phases and the periods for the strings of battery cells.

In further features, determining the periods for the phases includessetting a first period of a first one of the phases to one of (a)greater than and (b) less than a second period of a second one of thephases.

In further features, determining the periods for the phases furtherincludes setting a third period of a third one of the phases to: one of(a) greater than and (b) less than the second period of the second oneof the phases; and one of (a) greater than and (b) less than the firstperiod of the first one of the phases.

In further features, determining the periods for the phases includessetting first, second, and third periods of first, second, and thirdones of the phases to values that are different from each other.

In further features, determining the periods for the strings includes:setting the period for a second one of the strings of a second one ofthe battery modules to end before the end of a second phase; and settingthe periods for the other two strings of the second one of the batterymodules to end at the end of the second phase.

In further features, selectively actuating the switches includesactuating the switches and: disconnecting one of the strings of one ofthe battery modules before the end of a phase during charging of the oneof the battery modules based on the SOC of the one of the strings beinggreater than the SOCs of the other strings of the one of the batterymodules at a beginning of the phase; and disconnecting the other stringsof the one of the battery modules at the end of the phase.

In further features, selectively actuating the switches includesactuating the switches and: disconnecting one of the strings of one ofthe battery modules before the end of a phase during discharging of theone of the battery modules based on the SOC of the one of the stringsbeing less than the SOCs of the other strings of the one of the batterymodules at a beginning of the phase; and disconnecting the other stringsof the one of the battery modules at the end of the phase.

Further areas of applicability of the present disclosure will becomeapparent from the detailed description, the claims and the drawings. Thedetailed description and specific examples are intended for purposes ofillustration only and are not intended to limit the scope of thedisclosure.

BRIEF DESCRIPTION OF THE DRAWINGS

The present disclosure will become more fully understood from thedetailed description and the accompanying drawings, wherein:

FIG. 1 is a functional block diagram of an example engine controlsystem;

FIG. 2 is a functional block diagram an example battery system of avehicle;

FIGS. 3A-3B are a schematic including an example implementation of abattery system;

FIG. 4 is a functional block diagram of an example implementation of onebattery module in an open (X) configuration;

FIG. 5 includes an example illustration of the battery module in aseries (S) configuration;

FIG. 6 includes an example illustration of the battery module in aparallel (P) configuration;

FIG. 7 is a functional block diagram of an example switch control module

FIG. 8 includes an example time series for operation in a power modeduring charging;

FIG. 9 is a flowchart depicting an example method of balancing the SOCsof the battery strings and battery modules of a battery;

FIG. 10 includes an example time series for operation in a power modewith early string disconnection for balancing;

FIG. 11 is an example time series illustrating balancing of SOCs of thestrings of a battery module during charging by disconnecting one of thestrings before the end of a phase; and

FIG. 12 includes an example graph of SOCs of battery strings over timeduring discharging using string and module balancing.

In the drawings, reference numbers may be reused to identify similarand/or identical elements.

DETAILED DESCRIPTION

A vehicle includes a battery having a first terminal on a housing of thebattery for outputting a first operating voltage (e.g., 48 V) and asecond output terminal on the housing for outputting a second operatingvoltage (e.g., 12 V). The battery includes a plurality of batterymodules and a plurality of switches. Each battery module includes aplurality of battery strings, and each battery string includes aplurality of battery cells. The switches are configured to connectstrings together in series or individually to a terminal. The stringscan also be disconnected from the first and second output terminals.

According to the present application, a model predictive control (MPC)module uses estimates of SOCs of the battery strings and controls theswitches to minimize SOC error across the battery strings and batterymodules. This ensures that each battery string is charged and dischargedas evenly as possible and maximizes battery life. As discussed furtherbelow, the MPC utilizes a simplified control strategy to balance theSOCs of the battery strings while also decreasing computational effortand associated memory use.

Referring now to FIG. 1 , a functional block diagram of an examplepowertrain system 100 is presented. The powertrain system 100 of avehicle includes an engine 102 that combusts an air/fuel mixture toproduce torque. The vehicle may be non-autonomous or autonomous.

Air is drawn into the engine 102 through an intake system 108. Theintake system 108 may include an intake manifold 110 and a throttlevalve 112. For example only, the throttle valve 112 may include abutterfly valve having a rotatable blade. An engine control module (ECM)114 controls a throttle actuator module 116, and the throttle actuatormodule 116 regulates opening of the throttle valve 112 to controlairflow into the intake manifold 110.

Air from the intake manifold 110 is drawn into cylinders of the engine102. While the engine 102 includes multiple cylinders, for illustrationpurposes a single representative cylinder 118 is shown. For exampleonly, the engine 102 may include 2, 3, 4, 5, 6, 8, 10, and/or 12cylinders. The ECM 114 may instruct a cylinder actuator module 120 toselectively deactivate some of the cylinders under some circumstances,which may improve fuel efficiency.

The engine 102 may operate using a four-stroke cycle or another suitableengine cycle. The four strokes of a four-stroke cycle, described below,will be referred to as the intake stroke, the compression stroke, thecombustion stroke, and the exhaust stroke. During each revolution of acrankshaft (not shown), two of the four strokes occur within thecylinder 118. Therefore, two crankshaft revolutions are necessary forthe cylinder 118 to experience all four of the strokes. For four-strokeengines, one engine cycle may correspond to two crankshaft revolutions.

When the cylinder 118 is activated, air from the intake manifold 110 isdrawn into the cylinder 118 through an intake valve 122 during theintake stroke. The ECM 114 controls a fuel actuator module 124, whichregulates fuel injection to achieve a desired air/fuel ratio. Fuel maybe injected into the intake manifold 110 at a central location or atmultiple locations, such as near the intake valve 122 of each of thecylinders. In various implementations (not shown), fuel may be injecteddirectly into the cylinders or into mixing chambers/ports associatedwith the cylinders. The fuel actuator module 124 may halt injection offuel to cylinders that are deactivated.

The injected fuel mixes with air and creates an air/fuel mixture in thecylinder 118. During the compression stroke, a piston (not shown) withinthe cylinder 118 compresses the air/fuel mixture. The engine 102 may bea compression-ignition engine, in which case compression causes ignitionof the air/fuel mixture. Alternatively, the engine 102 may be aspark-ignition engine, in which case a spark actuator module 126energizes a spark plug 128 in the cylinder 118 based on a signal fromthe ECM 114, which ignites the air/fuel mixture. Some types of engines,such as homogenous charge compression ignition (HCCI) engines mayperform both compression ignition and spark ignition. The timing of thespark may be specified relative to the time when the piston is at itstopmost position, which will be referred to as top dead center (TDC).

The spark actuator module 126 may be controlled by a timing signalspecifying how far before or after TDC to generate the spark. Becausepiston position is directly related to crankshaft rotation, operation ofthe spark actuator module 126 may be synchronized with the position ofthe crankshaft. The spark actuator module 126 may disable provision ofspark to deactivated cylinders or provide spark to deactivatedcylinders.

During the combustion stroke, the combustion of the air/fuel mixturedrives the piston down, thereby driving the crankshaft. The combustionstroke may be defined as the time between the piston reaching TDC andthe time when the piston returns to a bottom most position, which willbe referred to as bottom dead center (BDC).

During the exhaust stroke, the piston begins moving up from BDC andexpels the byproducts of combustion through an exhaust valve 130. Thebyproducts of combustion are exhausted from the vehicle via an exhaustsystem 134.

The intake valve 122 may be controlled by an intake camshaft 140, whilethe exhaust valve 130 may be controlled by an exhaust camshaft 142. Invarious implementations, multiple intake camshafts (including the intakecamshaft 140) may control multiple intake valves (including the intakevalve 122) for the cylinder 118 and/or may control the intake valves(including the intake valve 122) of multiple banks of cylinders(including the cylinder 118). Similarly, multiple exhaust camshafts(including the exhaust camshaft 142) may control multiple exhaust valvesfor the cylinder 118 and/or may control exhaust valves (including theexhaust valve 130) for multiple banks of cylinders (including thecylinder 118). While camshaft-based valve actuation is shown and hasbeen discussed, camless valve actuators may be implemented. Whileseparate intake and exhaust camshafts are shown, one camshaft havinglobes for both the intake and exhaust valves may be used.

The cylinder actuator module 120 may deactivate the cylinder 118 bydisabling opening of the intake valve 122 and/or the exhaust valve 130.The time when the intake valve 122 is opened may be varied with respectto piston TDC by an intake cam phaser 148. The time when the exhaustvalve 130 is opened may be varied with respect to piston TDC by anexhaust cam phaser 150. A phaser actuator module 158 may control theintake cam phaser 148 and the exhaust cam phaser 150 based on signalsfrom the ECM 114. In various implementations, cam phasing may beomitted. Variable valve lift (not shown) may also be controlled by thephaser actuator module 158. In various other implementations, the intakevalve 122 and/or the exhaust valve 130 may be controlled by actuatorsother than a camshaft, such as electromechanical actuators,electrohydraulic actuators, electromagnetic actuators, etc.

The engine 102 may include zero, one, or more than one boost device thatprovides pressurized air to the intake manifold 110. For example, FIG. 1shows a turbocharger including a turbocharger turbine 160-1 that isdriven by exhaust gases flowing through the exhaust system 134. Asupercharger is another type of boost device.

The turbocharger also includes a turbocharger compressor 160-2 that isdriven by the turbocharger turbine 160-1 and that compresses air leadinginto the throttle valve 112. A wastegate (WG) 162 controls exhaust flowthrough and bypassing the turbocharger turbine 160-1. Wastegates canalso be referred to as (turbocharger) turbine bypass valves. Thewastegate 162 may allow exhaust to bypass the turbocharger turbine 160-1to reduce intake air compression provided by the turbocharger. The ECM114 may control the turbocharger via a wastegate actuator module 164.The wastegate actuator module 164 may modulate the boost of theturbocharger by controlling an opening of the wastegate 162.

A cooler (e.g., a charge air cooler or an intercooler) may dissipatesome of the heat contained in the compressed air charge, which may begenerated as the air is compressed. Although shown separated forpurposes of illustration, the turbocharger turbine 160-1 and theturbocharger compressor 160-2 may be mechanically linked to each other,placing intake air in close proximity to hot exhaust. The compressed aircharge may absorb heat from components of the exhaust system 134.

The engine 102 may include an exhaust gas recirculation (EGR) valve 170,which selectively redirects exhaust gas back to the intake manifold 110.The EGR valve 170 may receive exhaust gas from upstream of theturbocharger turbine 160-1 in the exhaust system 134. The EGR valve 170may be controlled by an EGR actuator module 172.

Crankshaft position may be measured using a crankshaft position sensor180. An engine speed may be determined based on the crankshaft positionmeasured using the crankshaft position sensor 180. A temperature ofengine coolant may be measured using an engine coolant temperature (ECT)sensor 182. The ECT sensor 182 may be located within the engine 102 orat other locations where the coolant is circulated, such as a radiator(not shown).

A pressure within the intake manifold 110 may be measured using amanifold absolute pressure (MAP) sensor 184. In various implementations,engine vacuum, which is the difference between ambient air pressure andthe pressure within the intake manifold 110, may be measured. A massflow rate of air flowing into the intake manifold 110 may be measuredusing a mass air flow (MAF) sensor 186. In various implementations, theMAF sensor 186 may be located in a housing that also includes thethrottle valve 112.

Position of the throttle valve 112 may be measured using one or morethrottle position sensors (TPS) 190. A temperature of air being drawninto the engine 102 may be measured using an intake air temperature(IAT) sensor 192. One or more other sensors 193 may also be implemented.The other sensors 193 include an accelerator pedal position (APP)sensor, a brake pedal position (BPP) sensor, may include a clutch pedalposition (CPP) sensor (e.g., in the case of a manual transmission), andmay include one or more other types of sensors. An APP sensor measures aposition of an accelerator pedal within a passenger cabin of thevehicle. A BPP sensor measures a position of a brake pedal within apassenger cabin of the vehicle. A CPP sensor measures a position of aclutch pedal within the passenger cabin of the vehicle. The othersensors 193 may also include one or more acceleration sensors thatmeasure longitudinal (e.g., fore/aft) acceleration of the vehicle andlatitudinal acceleration of the vehicle. An accelerometer is an exampletype of acceleration sensor, although other types of accelerationsensors may be used. The ECM 114 may use signals from the sensors tomake control decisions for the engine 102.

The ECM 114 may communicate with a transmission control module 194, forexample, to coordinate engine operation with gear shifts in atransmission 195. The ECM 114 may communicate with a hybrid controlmodule 196, for example, to coordinate operation of the engine 102 andan electric motor 198. While the example of one electric motor isprovided, multiple electric motors may be implemented. The electricmotor 198 may be a permanent magnet electric motor or another suitabletype of electric motor that outputs voltage based on backelectromagnetic force (EMF) when free spinning, such as a direct current(DC) electric motor or a synchronous electric motor. In variousimplementations, various functions of the ECM 114, the transmissioncontrol module 194, and the hybrid control module 196 may be integratedinto one or more modules.

Each system that varies an engine parameter may be referred to as anengine actuator. Each engine actuator has an associated actuator value.For example, the throttle actuator module 116 may be referred to as anengine actuator, and the throttle opening area may be referred to as theactuator value. In the example of FIG. 1 , the throttle actuator module116 achieves the throttle opening area by adjusting an angle of theblade of the throttle valve 112.

The spark actuator module 126 may also be referred to as an engineactuator, while the corresponding actuator value may be the amount ofspark advance relative to cylinder TDC. Other engine actuators mayinclude the cylinder actuator module 120, the fuel actuator module 124,the phaser actuator module 158, the wastegate actuator module 164, andthe EGR actuator module 172. For these engine actuators, the actuatorvalues may correspond to a cylinder activation/deactivation sequence,fueling rate, intake and exhaust cam phaser angles, target wastegateopening, and EGR valve opening, respectively.

The ECM 114 may control the actuator values in order to cause the engine102 to output torque based on a torque request. The ECM 114 maydetermine the torque request, for example, based on one or more driverinputs, such as an APP, a BPP, a CPP, and/or one or more other suitabledriver inputs. The ECM 114 may determine the torque request, forexample, using one or more functions or lookup tables that relate thedriver input(s) to torque requests.

Under some circumstances, the hybrid control module 196 controls theelectric motor 198 to output torque, for example, to supplement enginetorque output. The hybrid control module 196 may also control theelectric motor 198 to output torque for vehicle propulsion at times whenthe engine 102 is shut down.

The hybrid control module 196 applies electrical power from a battery208 to the electric motor 198 to cause the electric motor 198 to outputpositive torque. The battery is discussed further below. The electricmotor 198 may output torque, for example, to an input shaft of thetransmission 195, to an output shaft of the transmission 195, or toanother component. A clutch 200 may be implemented to couple theelectric motor 198 to the transmission 195 and to decouple the electricmotor 198 from the transmission 195. One or more gearing devices may beimplemented between an output of the electric motor 198 and an input ofthe transmission 195 to provide one or more predetermined gear ratiosbetween rotation of the electric motor 198 and rotation of the input ofthe transmission 195. In various implementations, the electric motor 198may be omitted. In vehicles, such as electric vehicles and autonomousvehicles, the battery 208 can be used to supply self redundant power tovarious systems, such as automotive safety integrity level (ASIL)systems and advanced driver assistant systems (ADAS), as well as servemultiple output voltages (e.g., 12 and 48 volts)

The ECM 114 starts the engine 102 via a starter motor 202. The ECM 114or another suitable module of the vehicle engages the starter motor 202with the engine 102 for an engine startup event. For example only, theECM 114 may engage the starter motor 202 with the engine 102 when a keyON command is received. A driver may input a key ON command, forexample, via actuating one or more ignition keys, buttons, and/orswitches of the vehicle or of a key fob of the vehicle. The startermotor 202 may engage a flywheel coupled to the crankshaft or one or moreother suitable components that drive rotation of the crankshaft.

The ECM 114 may also start the engine in response to an auto-startcommand during an auto-stop/start event or to an engine start commandfor a sailing event. Auto-stop/start events include shutting down theengine 102 while the vehicle is stopped, the driver has depressed thebrake pedal, and the driver has not input a key OFF command. Anauto-start command may be generated while the engine 102 is shut downfor an auto-stop/start event, for example, when a driver releases thebrake pedal and/or depresses the accelerator pedal.

Sail events may include the ECM 114 shutting down the engine 102 whenthe vehicle is moving (e.g., vehicle speed greater than a predeterminedspeed, such as 50 miles per hour), the driver is not applying pressureto the accelerator pedal, and the driver has not input a key OFFcommand. An engine start command may be generated while the engine 102is shut down for a sail event, for example, when a driver depresses theaccelerator pedal. The driver may input a key OFF command, for example,via actuating the one or more ignition keys, buttons, and/or switches,as discussed above.

A starter motor actuator, such as a solenoid, may actuate the startermotor 202 into engagement with the engine 102. For example only, thestarter motor actuator may engage a starter pinion with a flywheelcoupled to the crankshaft. In various implementations, the starterpinion may be coupled to the starter motor 202 via a driveshaft and aone-way clutch. A starter actuator module 204 controls the starter motoractuator and the starter motor 202 based on signals from a startercontrol module, as discussed further below. In various implementations,the starter motor 202 may be maintained in engagement with the engine102.

In response to a command to start the engine 102 (e.g., an auto-startcommand, an engine start command for an end of a sail event, or when akey ON command is received), the starter actuator module 204 suppliescurrent to the starter motor 202 to start the engine 102. The starteractuator module 204 may also actuate the starter motor actuator toengage the starter motor 202 with the engine 102. The starter actuatormodule 204 may supply current to the starter motor 202 after engagingthe starter motor 202 with the engine 102, for example, to allow forteeth meshing.

The application of current to the starter motor 202 drives rotation ofthe starter motor 202, and the starter motor 202 drives rotation of thecrankshaft (e.g., via the flywheel). The period of the starter motor 202driving the crankshaft to start the engine 102 may be referred to asengine cranking.

The starter motor 202 draws power from the battery 208 to start theengine 102. Once the engine 102 is running after the engine startupevent, the starter motor 202 disengages or is disengaged from the engine102, and current flow to the starter motor 202 may be discontinued. Theengine 102 may be considered running, for example, when an engine speedexceeds a predetermined speed, such as a predetermined idle speed. Forexample only, the predetermined idle speed may be approximately 700revolutions per minute (rpm) or another suitable speed. Engine crankingmay be said to be completed when the engine 102 is running.

A generator 206 converts mechanical energy of the engine 102 intoalternating current (AC) power. For example, the generator 206 may becoupled to the crankshaft (e.g., via gears or a belt) and convertmechanical energy of the engine 102 into AC power by applying a load tothe crankshaft. The generator 206 rectifies the AC power into DC powerand stores the DC power in the battery 208. Alternatively, a rectifierthat is external to the generator 206 may be implemented to convert theAC power into DC power. The generator 206 may be, for example, analternator. In various implementations, such as in the case of a beltalternator starter (BAS), the starter motor 202 and the generator 206may be implemented together. In various implementations, one or moredirect current (DC) to DC converters may be implemented.

FIG. 2 is a functional block diagram of an example battery system of thevehicle. The battery 208 has at least two (positive) output terminalsand a negative terminal to provide at least two direct current (DC)operating voltages. For example only, the battery 208 may have a firstpositive (e.g., 48 Volt (V) nominal) terminal 210, a negative terminal212, and a second positive (e.g., 12 V nominal) terminal 214. While theexample of the battery 208 having a 48 V nominal operating voltage and a12 V nominal operating voltage is provided, the battery 208 may have oneor more other operating voltages.

The battery 208 includes a plurality of battery modules, such as a firstbattery module 224-1, ..., and an N-th battery module 224-N (“batterymodules 224”), where N is an integer greater than or equal to 2. Invarious implementations, N may be equal to 2, 3, 4, 5, 6, 8, 10, 12, oranother suitable number.

As discussed further below with respect to FIG. 4 , each of the batterymodules 224 includes multiple battery strings. Each battery string maybe individually replaceable. The ability to individually replace thebattery strings may enable the battery 208 to include a shorter warrantyperiod and have a lower warranty cost. The battery strings are alsoindividually isolatable, for example, in the event of a fault in abattery string. In various implementations, the battery 208 may have theform factor of a standard automotive grade 12 V battery.

The battery 208 includes a plurality of switches, such as first switches232-1, ..., N-th switches 232-N (collectively “switches 232”). Theswitches 232 enable the battery strings of the battery modules 224 to beconnected in series, parallel, or combinations of series and parallel toprovide target output voltages and capacities at the output terminals.

A switch control module 240 controls the switches 232 to provide desiredoutput voltages and capacities at the output terminals. The switchcontrol module 240 controls the switches 232 using model predictivecontrol (MPC) to as closely as possible balance the state of charges(SOCs) of the battery strings, as discussed further below.

FIGS. 3A-3B are a schematic including an example battery systemincluding the battery 208. Sets of the battery strings are connectablein series (via ones of the switches 232) to the first positive terminal210 and the negative terminal 212 to provide a first nominal outputvoltage (e.g., 48 V) via the first positive terminal 210. Individualones of the battery strings can be connected (via ones of the switches232) to the second positive terminal 214 and the negative terminal 212to provide a second nominal output voltage (e.g., 12 V) via the secondpositive terminal 214. How many of the battery strings are connected tothe first positive terminal 210 and the second positive terminal 214dictates the portions of the overall capacity of the battery 208available at each of the positive terminals.

As shown in FIG. 3B, a first set of vehicle electrical componentsoperates using one of the two or more operating voltages of the battery208. For example, the first set of vehicle electrical components may beconnected to the second positive terminal 214. The first set of vehicleelectrical components may include, for example but not limited to, theECM 114 and other control modules of the vehicle, the starter motor 202,and/or other electrical loads, such as first 12 V loads 304, second 12 Vloads 308, other control modules 312, third 12 V loads 316, and fourth12 V loads 320. In various implementations, a switching device 324 maybe implemented.

As shown in FIG. 3A, a second set of vehicle electrical componentsoperates using another one of the two or more operating voltages of thebattery 208. For example, the second set of vehicle electricalcomponents may be connected to the first positive terminal 210. Thesecond set of vehicle electrical components may include, for example butnot limited to, the generator 206 and various electrical loads, such as48 V loads 328. The generator 206 may be controlled to charge thebattery 208.

Each of the switches 232 may be an insulated gate bipolar transistor(IGBT), a field effect transistor (FET), such as a metal oxidesemiconductor FET (MOSFET), or another suitable type of switch.

FIG. 4 is a functional block diagram of an example implementation of oneof the battery modules 224, numbered battery module 404, and one set ofthe switches 232. Each of the battery modules 224 may be identical to404, and each set of the switches 232 may be identical.

The battery module 404 includes three battery strings, 408, 412, and416. The battery strings 408-416 are identical and each include fourbattery cells 420, 424, 428, and 432. The battery cells 420-432 areconnected in series to provide the second operating voltage (e.g., 12V). Each of the battery cells 420-432 may be, for example, a 3 V batterycell or have another suitable voltage to provide the second operatingvoltage when the battery cells 420-432 are connected in series. Thebattery cells 420-432 may be, for example lithium ferrophosphate (LFP)battery cells or have another suitable chemistry.

Negative terminals of the battery strings 408-416 are connected to thenegative terminal 212. The negative terminals of the battery strings 408and 412 are connected to the negative terminal 212 via switches 436 and440, respectively, when the switches 436 and 440 are closed. Theswitches 436 and 440 can open to disconnect the negative terminals ofthe battery strings 408 and 412 from the negative terminal 212. Thenegative terminal of the battery string 416 may be directly connected tothe negative terminal 212.

The positive terminal of the battery string 416 is connected with thenegative terminal of the battery string 412 such that the batterystrings 412 and 416 are connected in series when switch 444 is closed.The switch 444 can be opened to disconnect the positive terminal of thebattery string 416 from the negative terminal of the battery string 412.The positive terminal of the battery string 412 is connected with thenegative terminal of the battery string 408 such that the batterystrings 412 and 408 are connected in series when switch 448 is closed.The switch 448 can be opened to disconnect the positive terminal of thebattery string 412 from the negative terminal of the battery string 408.

Switches 452, 456, and 460 respectively connect and disconnect thepositive terminals of the battery strings 408, 412, and 416 to and froma first bus (e.g., 12 V bus) that is connected to the second positiveterminal 214. Switch 464 connects and disconnects the positive terminalof the battery string 408 to and from a second bus (e.g., a 48 V bus)that is connected to the first positive terminal 210.

The switch control module 240 controls switching of the switches of eachof the battery modules 224 (the set of switches). At any given time, theswitch control module 240 may actuate the switches associated with abattery module such that the battery module is in an open (X)configuration, a series (S) configuration, or a parallel (P)configuration. FIG. 4 includes an example illustration of the batterymodule 404 in the open (X) configuration. When a battery module is inthe open (X) configuration, all the battery strings of the batterymodule are disconnected from both the first positive terminal 210 andthe second positive terminal 214.

FIG. 5 includes an example illustration of the battery module 404 in theseries (S) configuration. When a battery module is in the series (S)configuration, all of the battery strings of the battery module areconnected in series and to the first positive terminal 210. This isaccomplished by closing switches 444, 448, and 464, and opening all ofthe other switches 436, 440, 452, 456, 460. None of the battery stringsis connected to the second positive terminal 214 when the battery moduleis in the series (S) configuration.

FIG. 6 includes an example illustration of the battery module 404 in theparallel (P) configuration. When a battery module is in the parallel (P)configuration, all the battery strings of the battery module areconnected in parallel to the second positive terminal 214. This isaccomplished by closing switches 452, 456, 460, 436, and 440, andopening all of the other switches 444, 448, and 464. None of the batterystrings is connected to the first positive terminal 210 when the batterymodule is in the parallel (P) configuration.

FIG. 7 is a functional block diagram of an example implementation of theswitch control module 240. A switching module 704 applies signals to(e.g., gate terminals) of the switches 232 (the sets of switches) of thebattery modules 224 to control actuation of the switches 232 and tocontrol whether each of the battery modules 224 is in the open (X)state, the series (S) state, or the parallel (P) state.

The switching module 704 applies the signals based on input from a modelpredictive control (MPC) module 708. The MPC module 708 determines apresent power mode, phase durations, and string and module disconnectiontimes based on one or more operating parameters and generates the outputto the switching module 704 based on the present power mode. The MPCmodule 708 generates the output further based on constraints 712 set bya constraint module 716. Examples of the constraints 712 include, forexample, a battery string cannot be connected to either the first orsecond positive terminal 210 and 214 when its battery module is in the Xconnection. A battery string cannot be connected to both the first andsecond positive terminals 210 and 214 at the same time. A battery stringcannot be connected multiple times to the second positive terminal 214when that battery module is to be connected in the parallel (P) mode.Phase durations may be constrained to meet the demand at the firstpositive terminal 210. The duration of connection of each string may belimited (constrained) to the end of the phase. The number of channels(battery strings) per battery module may be constrained to meet a demandat the second positive terminal 210. Another constraint is that only onebattery string of one battery module can be disconnected from the secondpositive terminal 214 before the end of a phase during operation of thatbattery module in the parallel mode to better balance the SOCs of thestrings of that battery module. The other two battery strings of thatone battery module are connected to the positive terminal until the endof the phase of operation of that battery module in the parallel mode.This constraint may minimize computational effort associated with theswitching. Also, the phase durations may not be constrained (via theconstraints 712) to be fixed length or the same length. The MPC module708 may therefore better and more quickly balance the SOCs of thebattery strings and the battery modules.

One, more than one, or all of the constraints 712 may be fixed. Invarious implementations, one or more of the constraints 712 may bevariable. The constraints module 716 may set variable constraints basedon one or more operating parameters 714. Examples of the operatingparameters 714 include, for example, the present power mode, a predictedduration of the present power mode, and other example operatingparameters.

A state of charge (SOC) module 718 determines a present state of charge(SOC) 720 of each of the battery strings. In other words, the SOC module718 determines present SOCs 720 of the battery strings, respectively.The SOC module 718 may determine the present SOC of a battery string,for example, based on at least one of a voltage across the batterystring and current to and from that battery string. The SOC module 718may determine the present SOC of a battery string using at least one ofan equation and a lookup table that relates voltage and/or current toSOC. In various implementations, the SOC module 718 may determine theSOC of a battery string based on impedance of the battery string, suchas to more precisely relate voltage and current to SOC. The SOC module718 does this for each battery string. Voltages and currents of thebattery strings 724 may be measured using voltage and current sensors,respectively.

The MPC module 708 controls switching of the switches (via the switchingmodule 704) to minimize an error (e.g., a sum of squared errors) betweenthe SOCs of the battery strings, respectively, for the present powermode. The MPC module 708 may control switching of the switches furtherbased on present output demands via the first and second positiveterminals 210 and 214 and predicted output demands from the first andsecond positive terminals 210 and 214. The present and predicted outputdemands are illustrated by 728. Due to the constraints 712, the MPCmodule 708 allows for the disconnection of only one battery stringbefore the end of a phase during charging or discharging. Thissimplifies control of the switching and reduces computational effortassociated with the control of the switching.

To balance the SOCs of the strings 720, using MPC the MPC module 708sets phase durations for each of three phases (phase 1, phase 2, andphase 3), a number of battery strings connected when in the P mode, anda duration that each of the battery strings is connected in the P mode.The durations of the phases may be set to different lengths based onstring and/or module balancing. Each power mode has an associated set ofconfigurations (X mode, P mode, or S mode) of the battery modules 224for that power mode. A table illustrating power modes and the batterymodule modes for each phase is provided below. The MPC module 708 cyclesthrough the phases (phase 1, phase 2, phase 3, then back to phase 1,etc.) repeatedly until the power mode is changed.

Power Mode Phase 1 Phase 2 Phase 3 Situation 1(XXX mode) XXX XXX XXX OFF2(XXP mode) XXP PXX XPX 12 V sleep mode 3(XXS mode) XXS SXX XSX 48 V lowpower mode with diagnostic 4(XPP mode) XPP PXP PPX 12 V medium powermode with diagnostic 5(SXP mode) SXP PSX XPS Low power 2 voltage modewith diagnostic 6(XSS mode) XSS SXS SSX 48 V medium power withdiagnostic 7(PPP mode) PPP PPP PPP 12 V high power cranking mode 8(PPSmode) PPS SPP PSP Normal 2 voltage mode 9 (PSS mode) PSS SPS SSP Normal2 voltage mode 10 (SSS mode) SSS SSS SSS 48 V high power mode

In the example table above, the battery module mode of the respectivebattery modules are provided for each phase. For example, when in powermode 5 (SXP mode), during the first phase (phase 1), the first batterymodule is operated in the series (S) mode, the second battery module isoperated in the open (X) mode, and the third battery module is operatedin the parallel (P) mode. Only 1 of the strings of the third batterymodule (being operated in the P mode) can be disconnected before the endof the first phase to better balance the strings of the third batterymodule. During the second phase (phase 2) of power mode 5, the firstbattery module is operated in the parallel (P) mode, the second batterymodule is operated in the series (S) mode, and the third battery moduleis operated in the open (X) mode. Only 1 of the strings of the firstbattery module (being operated in the P mode) can be disconnected beforethe end of the second phase to better balance the strings of the firstbattery module. During the third phase (phase 3) of power mode 5, thefirst battery module is operated in the open (X) mode, the secondbattery module is operated in the parallel (P) mode, and the thirdbattery module is operated in the series (S) mode. Only 1 of the stringsof the second battery module (being operated in the P mode) can bedisconnected before the end of the third phase to better balance thestrings of the second battery module.

The MPC module 708 sets the duration (length) of each of the first,second, and third phases based on balancing of the SOCs of each batterystring and each battery module. For example, the battery strings (e.g.,on average) of one battery module have lower SOCs than the other twobattery modules, during charging the MPC module 708 may set the phase orphases that the one battery module is operated in the parallel (P) modeto be longer than the phase or phases that the other two batterymodules. This will increase the SOCs of the other two battery modulesless than the SOC of the one of the battery modules such that the SOCsare more balanced across the battery modules. During discharging, thebattery strings (e.g., on average) of one battery module have lower SOCsthan the other two battery modules, the MPC module 708 may set the phaseor phases that the one battery module is operated in the parallel (P)mode to be shorter than the phase or phases that the other two batterymodules. This will decrease the SOCs of the other two battery modulesmore than the SOC of the one of the battery modules such that the SOCsare more balanced across the battery modules.

The MPC module 708 also sets the duration (length/period) of each phasethat each battery string is connected to the second positive terminal214 to balance the individual SOCs of the battery strings of eachmodule. For example, during charging, when one battery string of abattery module has a SOC that is lower than the other battery strings ofthat battery module, the MPC module 708 may set the duration for the oneof the battery strings to be connected to the second positive terminal214 to longer than the durations of the other battery strings of thebattery module. This will increase the SOC of the one battery string ofthe battery module more than the SOCs of the other battery strings ofthe battery module such that the SOCs are more balanced within thebattery module. The MPC module 708 does this for each battery module.During discharging, when one battery string of a battery module has aSOC that is lower than the other battery strings of that battery module,the MPC module 708 may set the duration for the one of the batterystrings to be connected to the second positive terminal 214 to shorterthan the durations of the other battery strings of the battery module.This will decrease the SOC of the one battery string of the batterymodule less than the SOCs of the other battery strings of the batterymodule such that the SOCs are more balanced within the battery module.The MPC module 708 does this for each battery module.

As another example, during charging, when one battery string of abattery module has a SOC that is higher than the other battery stringsof that battery module, the MPC module 708 may set the duration for theone of the battery strings to be connected to the second positiveterminal 214 such that the one of the battery strings is disconnectedprior to the end of the phase (i.e., to shorter than the phase) and theother two battery strings to the second positive terminal 214 areconnected for the entirety of the phase (i.e., to the length of thephase). This will increase the SOC of the one battery string of thebattery module to a lesser extent than the SOCs of the other batterystrings of the battery module such that the SOCs are more balancedwithin the battery module. The MPC module 708 does this for each batterymodule. During discharging, when one battery string of a battery modulehas a SOC that is lower than the other battery strings of that batterymodule, the MPC module 708 may set the duration for the one of thebattery strings such that the one of the battery strings is disconnectedprior to the end of the phase (i.e., to shorter than the phase) and theother two battery strings to the second positive terminal 214 areconnected for the entirety of the phase (i.e., to the length of thephase). This will decrease the SOC of the one battery string of thebattery module to a lesser extent than the SOCs of the other batterystrings of the battery module such that the SOCs are more balancedwithin the battery module. The MPC module 708 does this for each batterymodule.

FIG. 8 includes an example time series for operation in power mode 5(SXP) when the battery 208 is charging through the second positiveterminal 214 while charging or discharging through the first positiveterminal 210, such as with a small current. 804 is the first phase(phase 1), 808 is the second phase (phase 2), and 812 is the third phase(phase 3). As used herein, the MNO mode may mean that the first batterymodule is operating in mode M, the second battery module is operating inmode N, and the third battery module is operating in mode O, where M, N,and O are each one of parallel (P), series (S), or open (X). Forexample, the first phase includes SXP mode where the first batterymodule is operated in the series (S) mode, the second battery module isoperated in the open (X) mode, and the third battery module is operatedin the parallel (P) mode. The second phase includes operation in the PSXmode where the first battery module is operated in the parallel (P)mode, the second battery module is operated in the series (S) mode, andthe third battery module is operated in the open (X) mode. The thirdphase includes operation in the XPS mode where the first battery moduleis operated in the open (X) mode, the second battery module is operatedin the parallel (P) mode, and the third battery module is operated inthe series (S) mode.

In the example of FIG. 8 , the MPC module 708 set the duration of thesecond phase to longer than the duration of the third phase, and theduration of the third phase to shorter than the duration of the firstphase. Through the second positive terminal 214 allows for more chargingof the battery strings of the first battery module (which is connectedin the parallel (P) mode in the second phase) than the other batterymodules and allows for less charging of the battery strings of thesecond battery module (which is connected in the parallel (P) mode inthe third phase) than the battery strings of the third battery module.The third battery module is operated in the parallel (P) mode in thefirst phase.

During the first phase 804, the MPC module 708 connected the thirdbattery string 824 of the third battery module to the second positiveterminal 214 for a lesser total duration than the first and secondbattery strings 816 and 820 of the third battery module. This allows thefirst and second battery strings 816 and 820 of the third battery moduleto be charged more than the third battery string 824 of the thirdbattery module to balance the SOCs of the first, second, and thirdbattery strings 816, 820, and 824 of the third battery module.

During the second phase 808, the MPC module 708 connected the firstbattery string 828 of the first battery module to the second positiveterminal 214 for a lesser total duration than the second and thirdbattery strings 832 and 836 of the first battery module. This allows thesecond and third battery strings 832 and 836 of the first battery moduleto be charged more than the first battery string 828 of the firstbattery module to balance the SOCs of the first, second, and thirdbattery strings 828, 832, 836 of the first battery module.

During the third phase 812, the MPC module 708 connected the secondbattery string 844 of the second battery module to the second positiveterminal 214 for a lesser total duration than the first and thirdbattery strings 840 and 848 of the second battery module. This allowsthe first and third battery strings 840 and 848 of the second batterymodule to be charged more than the second battery string 844 of thesecond battery module to balance the SOCs of the first, second, andthird battery strings 840, 844, 848 of the second battery module.

Control then returns to the first phase assuming that the power mode hasnot changed. In other words, control continues from phase 1 to phase 2to phase 3 before repeating phases 1-3 in the same order.

While FIG. 8 is discussed as illustrating charging, similar isapplicable to the situation of discharging. For example, if the SOC ofthe third strings of the first, second, and third battery modules arelower than the SOCs of the first and second strings of the first-thirdbattery modules, respectively, the MPC module 708 may connect the thirdstrings of the first-third battery modules during the respective phasesto the second positive terminal 214 for shorter total periods than thefirst and second strings of the first-third battery modules. Thisdischarges the third strings less than the first and second strings andbalances the SOCs of the battery strings.

FIG. 9 is a flowchart depicting an example method of balancing the SOCsof the battery strings of the battery modules of the battery 208.Control begins with 904 where the SOC module 718 determines the SOCs ofthe battery strings (first, second, and third) of each of the batterymodules 224 (first, second, and third) of the battery 208.

At 908, the SOC module 718 may determine SOCs of the battery modules(first, second, and third) based on the battery strings of the batterymodules, respectively. For example, the SOC module 718 may determine anSOC of the first battery module based on an average of the SOCs of thebattery strings (first, second, and third) of the first battery module.The SOC module 718 may determine an SOC of the second battery modulebased on an average of the SOCs of the battery strings (first, second,and third) of the second battery module. The SOC module 718 maydetermine an SOC of the third battery module based on an average of theSOCs of the battery strings (first, second, and third) of the thirdbattery module.

At 912, the MPC module 708 determines the power mode, such as describedabove. The MPC module 708 may select one of the power modes above, suchas the SXP mode, the XPP mode, the XXP mode, or another one of the modesabove.

At 916, the MPC module 708 determines the phase durations (the periodsof the first, second, and third phases) based on the power mode and theSOCs of the battery modules. For example, for discharging, the MPCmodule 708 may set the durations of a phase when a battery module is tobe connected in the parallel (P) mode to shorter than the durations ofthe other phases when the SOC of that battery module is less than theSOC of the other battery modules. The MPC module 708 determines thephase durations using MPC, and the phase durations may be different. Inother words, the phase durations are not constrained (via theconstraints 712) to be the same.

At 920, the MPC module 708 determines durations for connection of eachstring of each battery module within the phases. As discussed above,only one string of a battery module to be operated in the P mode duringa phase can be disconnected before the end of the phase. For example,during charging, the MPC module 708 may charge two battery stringslonger (until the end of a phase) than other battery string (disconnectbefore the end of the phase) when the battery strings have lower SOCsthan the other battery string. During discharging, the MPC module 708may discharge battery strings longer than the other battery string whenthe battery strings have higher SOCs than the other battery string. TheMPC module 708 determines the battery string durations using MPC and,via the constraints 712, can set only one of the battery strings of abattery module to be disconnected prior to the end of a phase duringwhich that battery module is to be operated in the P mode.

In various implementations 912 and 916 may be performed concurrently bythe MPC module 708. The optimization cost criterion may be zero when allstring SOCs are equal and may become larger with larger differencesbetween the SOCs. One possible formulation of such a cost criterion is aweighted sum of squared differences between the SOCs of neighboringpairs in a cyclic chain that includes all of the strings, this sum takenover a planning horizon consisting of one or more complete cyclesthrough the three phases. Additional penalties may be added such as acost on the total connection times of strings with the purpose ofavoiding overheating any string. The variables in the optimization arethe durations of the phases and the duration that each string isconnected in P configuration. Minimization of the cost criterion issubject to the constraints 712. Violation of a constraint increases thecost of a possibility and thus prevents the possibility from beingselected and used. Given the output demands and predictions 728, thecost criterion can be evaluated by the MPC module 708 for any set ofconnection durations. The solution of the minimization problem is theset of phase durations and string connection durations that most nearlybalance the string SOCs over the planning horizon, subject to theconstraints 712 and taking into account any additional penalty terms.

At 924, the switching module 704 actuates the switches 232 according tothe power mode, the phase durations, and the battery string durations.Control returns to 904 for a next loop.

FIG. 10 includes an example graph over time 1002 for operation in powermode 8 (PPS) when the battery 208 is charging. 1004 is the first phase(phase 1), 1008 is the second phase (phase 2), and 1012 is the thirdphase (phase 3). Row 1016 represents the first battery module, row 1020represents the second battery module, and row 1024 represents the thirdbattery module. 1, 2, and 3 of the rows are the first, second, and thirdstrings of that battery module.

As illustrated, during the first phase 1004, the first and secondbattery modules 1016 and 1020 are operated in the P mode, and the thirdmodule 1024 is operated in the S mode. During the first phase 1004, onlythe third string (3) of the first battery module 1016 is disconnectedbefore the end of the first phase 1004. The end of the first phase 1004is illustrated by 1028 in FIG. 10 .

During the second phase 1008, the second and third battery modules 1020and 1024 are operated in the P mode, and the first module 1016 isoperated in the S mode. During the second phase 1008, only the firststring (1) of the second battery module 1020 is disconnected before theend of the second phase 1008. The end of the second phase 1008 isillustrated by 1032 in FIG. 10 .

During the third phase 1012, the first and third battery modules 1016and 1024 are operated in the P mode, and the second module 1020 isoperated in the S mode. During the third phase 1012, only the secondstring (2) of the third battery module 1024 is disconnected before theend of the third phase 1012. The end of the third phase 1012 isillustrated by 1036 in FIG. 10 .

FIG. 11 is an example time series illustrating balancing of SOCs of thestrings of a battery module during charging by disconnecting one of thestrings before the end of a phase. Allowing the disconnection of one ofthe strings before the end of a phase simplifies control and decreasescomputational effort of the MPC module 708.

Initially, at time 1104, the first and third strings (A1 and A3) of thebattery module have lower SOCs than the second string (A2) of thebattery module. At 1108, starting at a beginning of a phase during whichthe battery module is operated in the P mode, the first, second, andthird battery strings (A1, A2, and A3) are connected to the secondpositive terminal 214, thereby charging the first, second, and thirdbattery strings.

At 1112, before the end of the phase, switching control module 240disconnects the second string (A2) from the second positive terminal 214to balance the SOCs of the first, second, and third strings. The firstand third strings (A1 and A3) continue to charge during 1112. At 1116,the switching control module 240 has disconnected all of the first,second, and third strings (A1, A2, and A3) from the second positiveterminal 214. As illustrated, the SOCs of the strings are more balancedthan they were initially at 1104.

Example charging magnitudes are shown for illustration purposes only,and the charging magnitudes may be different than shown.

FIG. 12 includes an example graph of SOCs 1204 of battery strings overtime 1208 during discharging according to the string and modulebalancing discussed above. As illustrated, despite the SOCs differinginitially, the SOCs become approximately equal relatively quickly.Higher currents can result in the string and module balancing beingachieved faster. The 10,000 second time scale is provided only as anexample in FIG. 12 and should not imply that string and/or modulebalancing will take that long.

The foregoing description is merely illustrative in nature and is in noway intended to limit the disclosure, its application, or uses. Thebroad teachings of the disclosure can be implemented in a variety offorms. Therefore, while this disclosure includes particular examples,the true scope of the disclosure should not be so limited since othermodifications will become apparent upon a study of the drawings, thespecification, and the following claims. It should be understood thatone or more steps within a method may be executed in different order (orconcurrently) without altering the principles of the present disclosure.Further, although each of the embodiments is described above as havingcertain features, any one or more of those features described withrespect to any embodiment of the disclosure can be implemented in and/orcombined with features of any of the other embodiments, even if thatcombination is not explicitly described. In other words, the describedembodiments are not mutually exclusive, and permutations of one or moreembodiments with one another remain within the scope of this disclosure.

Spatial and functional relationships between elements (for example,between modules, circuit elements, semiconductor layers, etc.) aredescribed using various terms, including “connected,” “engaged,”“coupled,” “adjacent,” “next to,” “on top of,” “above,” “below,” and“disposed.” Unless explicitly described as being “direct,” when arelationship between first and second elements is described in the abovedisclosure, that relationship can be a direct relationship where noother intervening elements are present between the first and secondelements, but can also be an indirect relationship where one or moreintervening elements are present (either spatially or functionally)between the first and second elements. As used herein, the phrase atleast one of A, B, and C should be construed to mean a logical (A OR BOR C), using a non-exclusive logical OR, and should not be construed tomean “at least one of A, at least one of B, and at least one of C.”

In the figures, the direction of an arrow, as indicated by thearrowhead, generally demonstrates the flow of information (such as dataor instructions) that is of interest to the illustration. For example,when element A and element B exchange a variety of information butinformation transmitted from element A to element B is relevant to theillustration, the arrow may point from element A to element B. Thisunidirectional arrow does not imply that no other information istransmitted from element B to element A. Further, for information sentfrom element A to element B, element B may send requests for, or receiptacknowledgements of, the information to element A.

In this application, including the definitions below, the term “module”or the term “controller” may be replaced with the term “circuit.” Theterm “module” may refer to, be part of, or include: an ApplicationSpecific Integrated Circuit (ASIC); a digital, analog, or mixedanalog/digital discrete circuit; a digital, analog, or mixedanalog/digital integrated circuit; a combinational logic circuit; afield programmable gate array (FPGA); a processor circuit (shared,dedicated, or group) that executes code; a memory circuit (shared,dedicated, or group) that stores code executed by the processor circuit;other suitable hardware components that provide the describedfunctionality; or a combination of some or all of the above, such as ina system-on-chip.

The module may include one or more interface circuits. In some examples,the interface circuits may include wired or wireless interfaces that areconnected to a local area network (LAN), the Internet, a wide areanetwork (WAN), or combinations thereof. The functionality of any givenmodule of the present disclosure may be distributed among multiplemodules that are connected via interface circuits. For example, multiplemodules may allow load balancing. In a further example, a server (alsoknown as remote, or cloud) module may accomplish some functionality onbehalf of a client module.

The term code, as used above, may include software, firmware, and/ormicrocode, and may refer to programs, routines, functions, classes, datastructures, and/or objects. The term shared processor circuitencompasses a single processor circuit that executes some or all codefrom multiple modules. The term group processor circuit encompasses aprocessor circuit that, in combination with additional processorcircuits, executes some or all code from one or more modules. Referencesto multiple processor circuits encompass multiple processor circuits ondiscrete dies, multiple processor circuits on a single die, multiplecores of a single processor circuit, multiple threads of a singleprocessor circuit, or a combination of the above. The term shared memorycircuit encompasses a single memory circuit that stores some or all codefrom multiple modules. The term group memory circuit encompasses amemory circuit that, in combination with additional memories, storessome or all code from one or more modules.

The term memory circuit is a subset of the term computer-readablemedium. The term computer-readable medium, as used herein, does notencompass transitory electrical or electromagnetic signals propagatingthrough a medium (such as on a carrier wave); the term computer-readablemedium may therefore be considered tangible and non-transitory.Non-limiting examples of a non-transitory, tangible computer-readablemedium are nonvolatile memory circuits (such as a flash memory circuit,an erasable programmable read-only memory circuit, or a mask read-onlymemory circuit), volatile memory circuits (such as a static randomaccess memory circuit or a dynamic random access memory circuit),magnetic storage media (such as an analog or digital magnetic tape or ahard disk drive), and optical storage media (such as a CD, a DVD, or aBlu-ray Disc).

The apparatuses and methods described in this application may bepartially or fully implemented by a special purpose computer created byconfiguring a general purpose computer to execute one or more particularfunctions embodied in computer programs. The functional blocks,flowchart components, and other elements described above serve assoftware specifications, which can be translated into the computerprograms by the routine work of a skilled technician or programmer.

The computer programs include processor-executable instructions that arestored on at least one non-transitory, tangible computer-readablemedium. The computer programs may also include or rely on stored data.The computer programs may encompass a basic input/output system (BIOS)that interacts with hardware of the special purpose computer, devicedrivers that interact with particular devices of the special purposecomputer, one or more operating systems, user applications, backgroundservices, background applications, etc.

The computer programs may include: (i) descriptive text to be parsed,such as HTML (hypertext markup language), XML (extensible markuplanguage), or JSON (JavaScript Object Notation) (ii) assembly code,(iii) object code generated from source code by a compiler, (iv) sourcecode for execution by an interpreter, (v) source code for compilationand execution by a just-in-time compiler, etc. As examples only, sourcecode may be written using syntax from languages including C, C++, C#,Objective-C, Swift, Haskell, Go, SQL, R, Lisp, Java®, Fortran, Perl,Pascal, Curl, OCaml, Javascript®, HTML5 (Hypertext Markup Language 5threvision), Ada, ASP (Active Server Pages), PHP (PHP: HypertextPreprocessor), Scala, Eiffel, Smalltalk, Erlang, Ruby, Flash®, VisualBasic®, Lua, MATLAB, SIMULINK, and Python®.

What is claimed is:
 1. A battery system comprising: a first positiveterminal, a second positive terminal, and a negative terminal; switches;at least two battery modules, wherein each of the at least two batterymodules includes three strings of battery cells that are configured to,at different times be: connected in series and to the first positiveterminal via first ones of the switches; connected in parallel and tothe second positive terminal via second ones of the switches; anddisconnected from both of the first and second positive terminals; and aswitch control module configured to: determine state of charges (SOCs)of the strings of battery cells, respectively; determine, using modelpredictive control based on the SOCs, periods of phases, respectively;determine, using model predictive control based on the SOCs, periods forthe strings, respectively, to be connected to the second positiveterminal and the negative terminal during the phases, the determinationof the periods for the strings including: setting the period for one ofthe strings of one of the battery modules to end before the end of aphase; and setting the periods for the other two strings of the one ofthe battery modules to end at the end of the phase; and selectivelyactuate the switches based on the periods of the phases and the periodsfor the strings of battery cells.
 2. The battery system of claim 1wherein the switch control module is configured to, using modelpredictive control, set a first period of a first one of the phases toone of (a) greater than and (b) less than a second period of a secondone of the phases.
 3. The battery system of claim 2 wherein the switchcontrol module is configured to, using model predictive control, set athird period of a third one of the phases to: one of (a) greater thanand (b) less than the second period of the second one of the phases; andone of (a) greater than and (b) less than the first period of the firstone of the phases.
 4. The battery system of claim 1 wherein the switchcontrol module is configured to, using model predictive control, setfirst, second, and third periods of first, second, and third ones of thephases to values that are different from each other.
 5. The batterysystem of claim 1 wherein the switch control module is furtherconfigured to: set the period for a second one of the strings of asecond one of the battery modules to end before the end of a secondphase; and setting the periods for the other two strings of the secondone of the battery modules to end at the end of the second phase.
 6. Thebattery system of claim 1 wherein the switch control module isconfigured to actuate the switches and: disconnect one of the strings ofone of the battery modules before the end of a phase during charging ofthe one of the battery modules based on the SOC of the one of thestrings being greater than the SOCs of the other strings of the one ofthe battery modules at a beginning of the phase; and disconnect theother strings of the one of the battery modules at the end of the phase.7. The battery system of claim 1 wherein the switch control module isconfigured to actuate the switches and: disconnect one of the strings ofone of the battery modules before the end of a phase during dischargingof the one of the battery modules based on the SOC of the one of thestrings being less than the SOCs of the other strings of the one of thebattery modules at a beginning of the phase; and disconnect the otherstrings of the one of the battery modules at the end of the phase. 8.The battery system of claim 1 wherein the switch control module isconfigured to, based on minimizing an error between the SOCs of thestrings of battery cells, determine the periods of the phases and theperiods for the strings.
 9. The battery system of claim 8 wherein theerror is a squared error between the SOCs of the strings of batterycells.
 10. The battery system of claim 1 wherein each of the strings ofbattery cells includes multiple battery cells connected in series. 11.The battery system of claim 10 wherein the multiple battery cellsinclude four three volt battery cells.
 12. The battery system of claim 1wherein the switch control module is configured to control the switchessuch that one of the strings of battery cells is not at the same timeconnected to both the first positive terminal and the second positiveterminal.
 13. The battery system of claim 1 wherein: the first positiveterminal is configured to output a first reference potential; the secondpositive terminal is configured to output a second reference potential;and the first reference potential is greater than the second referencepotential.
 14. A method for a battery, the method comprising:determining state of charges (SOCs) of strings of battery cells,respectively, of at least two battery modules, wherein each of the atleast two battery modules includes three strings of battery cells thatare configured to, at different times be: connected in series and to afirst positive terminal via first ones of switches; connected inparallel and to a second positive terminal via second ones of theswitches; and disconnected from both of the first and second positiveterminals; and determining, using model predictive control based on theSOCs, periods of phases, respectively; determining, using modelpredictive control based on the SOCs, periods for the strings,respectively, to be connected to the second positive terminal and anegative terminal during the phases, the determination of the periodsfor the strings including: setting the period for one of the strings ofone of the battery modules to end before the end of a phase; and settingthe periods for the other two strings of the one of the battery modulesto end at the end of the phase; and selectively actuating the switchesbased on the periods of the phases and the periods for the strings ofbattery cells.
 15. The method of claim 14 wherein determining theperiods for the phases includes setting a first period of a first one ofthe phases to one of (a) greater than and (b) less than a second periodof a second one of the phases.
 16. The method of claim 15 whereindetermining the periods for the phases further includes setting a thirdperiod of a third one of the phases to: one of (a) greater than and (b)less than the second period of the second one of the phases; and one of(a) greater than and (b) less than the first period of the first one ofthe phases.
 17. The method of claim 14 wherein determining the periodsfor the phases includes setting first, second, and third periods offirst, second, and third ones of the phases to values that are differentfrom each other.
 18. The method of claim 14 wherein determining theperiods for the strings includes: setting the period for a second one ofthe strings of a second one of the battery modules to end before the endof a second phase; and setting the periods for the other two strings ofthe second one of the battery modules to end at the end of the secondphase.
 19. The method of claim 14 wherein selectively actuating theswitches includes actuating the switches and: disconnecting one of thestrings of one of the battery modules before the end of a phase duringcharging of the one of the battery modules based on the SOC of the oneof the strings being greater than the SOCs of the other strings of theone of the battery modules at a beginning of the phase; anddisconnecting the other strings of the one of the battery modules at theend of the phase.
 20. The method of claim 14 wherein selectivelyactuating the switches includes actuating the switches and:disconnecting one of the strings of one of the battery modules beforethe end of a phase during discharging of the one of the battery modulesbased on the SOC of the one of the strings being less than the SOCs ofthe other strings of the one of the battery modules at a beginning ofthe phase; and disconnecting the other strings of the one of the batterymodules at the end of the phase.